from django.urls import path
from .views import (
    ChatMessages,
    ConversationListView,
    MessageHistoryView,
    RenameConversationView,
    DeleteConversationView,
    MessageFeedbackView,
    StopResponseView,
    AppInfoView,
    AppParametersView,
    AppMetaView,
    PinConversationView,
    UnpinConversationView,
    StatisticTokenCostsView,
    UpdateDifyConfigView,
)

urlpatterns = [
    path('chat-messages/', ChatMessages.as_view(), name='chat-messages'),  # 会话消息
    path('chat-messages/<str:task_id>/stop/', StopResponseView.as_view(), name='stop-response'),  # 停止响应
    path('conversations/', ConversationListView.as_view(), name='conversations'),  # 会话列表
    path('conversations/<str:conversation_id>/name/', RenameConversationView.as_view(), name='rename-conversation'),  # 重命名会话
    path('conversations/<str:conversation_id>/', DeleteConversationView.as_view(), name='delete-conversation'),  # 删除会话
    path('conversations/<str:conversation_id>/pin/', PinConversationView.as_view(), name='pin-conversation'),  # 置顶会话
    path('conversations/<str:conversation_id>/unpin/', UnpinConversationView.as_view(), name='unpin-conversation'),  # 取消置顶会话
    path('messages/', MessageHistoryView.as_view(), name='messages'),  # 消息历史
    path('messages/<str:message_id>/feedbacks/', MessageFeedbackView.as_view(), name='message-feedback'),  # 消息反馈
    path('info/', AppInfoView.as_view(), name='app-info'),  # 应用信息
    path('parameters/', AppParametersView.as_view(), name='app-parameters'),  # 应用参数
    path('meta/', AppMetaView.as_view(), name='app-meta'),  # 应用Meta信息
    path('statistic/token-costs/', StatisticTokenCostsView.as_view(), name='token-cost-statistic'),  # Token消耗统计
    path('model-config/', UpdateDifyConfigView.as_view(), name='model-config'), # 更新Dify配置
]
